GtkWindow: Use new begin_resize_drag api
authorMatthias Clasen <mclasen@redhat.com>
Sat, 5 Nov 2011 05:12:50 +0000 (01:12 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 5 Nov 2011 05:14:30 +0000 (01:14 -0400)
We have an event, so the correct thing to do is to pass
the device into the function that we are calling. GDK
just grew a variant that takes a device, for this purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=663444

gtk/gtkwindow.c

index 128caea92f1d3b129f174a934bef6e71d7593dd9..25a5f9f07601e5cb88e82baed3d8ae3c8d12e77f 100644 (file)
@@ -5893,12 +5893,13 @@ gtk_window_button_press_event (GtkWidget *widget,
   if (event->window == priv->grip_window)
     {
       if (get_drag_edge (widget, &edge))
-        gtk_window_begin_resize_drag (GTK_WINDOW (widget),
-                                      edge,
-                                      event->button,
-                                      event->x_root,
-                                      event->y_root,
-                                      event->time);
+        gdk_window_begin_resize_drag_for_device (gtk_widget_get_window (widget),
+                                                 edge,
+                                                 gdk_event_get_device (event),
+                                                 event->button,
+                                                 event->x_root,
+                                                 event->y_root,
+                                                 event->time);
 
       return TRUE;
     }